home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3431 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.3 KB

  1. Path: mayne.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
  4. Subject: Re: C or C++ for a 14-year old? The definitive reply
  5. Date: 23 Jan 1996 14:20:29 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4e3mvdINNpi3@mayne.ugrad.cs.ubc.ca>
  8. References: <4cve3a$f0n@news.iconn.net> <4b30ld$lp2$1@mhafc.production.compuserve.com> <qq91jhhtbr.fsf@tartarus.ucsd.edu> <4danli$llb@news.onramp.net>
  9. NNTP-Posting-Host: mayne.ugrad.cs.ubc.ca
  10.  
  11. In article <4danli$llb@news.onramp.net>, Rick Lutowski <oa@iah.com> wrote:
  12. >thecrow@iconn.net (The Crow) wrote:
  13. >>Whether you start with C or C++ is irrelevant, learning one will allow you to 
  14. >>learn the other with ease.
  15. >
  16. >This is true of the syntax, but not of the methodology or theory
  17. >behind them.  C and C++ are two totally different languages
  18. >conceptually, in spite of their surface similarity.
  19. >
  20. >If you know C and are thinking about learning C++, first go to
  21. >a local university library, find some papers written by David
  22. >Parnas, and read them to learn about information-hiding.  Then 
  23. >go on to some of the other OO authors like Booch to learn about
  24. >classes and inheritance, polymorphism and dynamic binding.
  25. >Once you think you understand those concepts, you are ready to
  26. >learn C++.
  27.  
  28. I know about those things, and can practice most of them under C.
  29. It's not entirely clear that any real benefits are derived from frills like
  30. language support for polymorphism and inheritance.
  31.  
  32. Information hiding leads to inefficiencies---and you _can_ have it in C, by the
  33. way. Even the C preprocessor lets you have efficient information hiding, if you
  34. use it with discipline. It's cheaper to access elements of a function via
  35. macros than be forced to communicate via abstract function calls. The only
  36. advantage that information hiding gives you is that 1) you can change the
  37. implementation of the data structure easily without recompiling modules that
  38. use it (big deal). 2) you have more control over how your software gets used. I
  39. think it's point 2 that is the chief motivation, because it allows capitalists
  40. to have better control over the production and trade of software.
  41.  
  42. The concepts of object oriented design and programming transcend the choice of
  43. programming language. Once can practice sound OO design with C, if one is so
  44. inclined.
  45. -- 
  46.  
  47.